package edu.nf.ch06;

import org.springframework.web.bind.annotation.*;

/**
 * @Author gjh
 * @Date 2025/10/9
 * @Description:
 */
@RestController
@RequestMapping("/mq")
public class MessageController {

    @PostMapping("/send")
    public String sendMessage(@RequestParam String msg) {
        Egister.send(msg);
        return "消息发送成功：" + msg;
    }


    @GetMapping("/register")
    public String register() {
        System.out.println(User.receive());
        return User.receive();
    }
}
